<?php
namespace Modules\Auth\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Laravel\Sanctum\HasApiTokens;
// 引入角色权限Trait:HasRoles
use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable
{
    use HasApiTokens,HasRoles;
    //设置守卫是api 而非web
    protected $guard_name = 'api';
    //之前设置的
    protected $table = 'users';
    protected $fillable = ['name', 'email', 'password', 'is_locked'];
    protected $hidden = ['password', 'remember_token'];
}
